<?php
require_once(OC_App::getAppPath('company') . "/lib/quota.php");

if (!PFactory::isMasterUser()) {
   echo '您无权访问该资源';
   exit();
}

$order_id = JRequest::getInt('order_id', 0);

$model = new PCompanyModelQuota();
$order = $model->getOrder($order_id);

if (empty($order)) {
   echo '<div class="quota_nodata large yahei">订单不存在！</div>';
   exit();
} else {
?>
<div class="odetailtitle yahei"><b>订单已生成，请按以下流程完成购买</b></div>
<div class="odetailsteptable">
   <table width="100%" cellpadding="0" cellspacing="0" border="0">
      <tr>
      	 <td width="16"><i class="ic_firststep">&nbsp;</i></td>
      	 <?php if ($order['order_type'] == 'upgrade'): ?>
      	 <td class="havebg">等候客服联系</td>
         <td width="22"><i class="ic_secondstep">&nbsp;</i></td>
         <?php endif; ?>
         <td class="havebg">汇款</td>
         <td width="22"><i class="ic_secondstep">&nbsp;</i></td>
         <td class="havebg">上传汇款凭证<em style="color:#999999;">(汇款单扫描件或照片)</em></td>
         <td width="22"><i class="ic_secondstep">&nbsp;</i></td>
         <td class="havebg">等候客服处理</td>
      </tr>
   </table>
</div>

<div class="odetailstepcontent">
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
   	<tr>
      	<td width="50%" style="border-right:1px dotted #dddddd;">
            <div>汇款账号</div>
            <p><b>公司全称</b><span><?=PIPAPAI_COMPANY_NAME?></span></p>
            <p><b>开户行</b><span><?=PIPAPAI_BANK?></span></p>
            <p><b>银行帐户</b><span><?=PIPAPAI_BANK_ACCOUNT?></span></p>
         </td>
         <td width="50%">
            <div>订单信息</div>
            <p><b>订单编号</b><span><?=$order['order_num']?></span></p>
            <p><b>订单内容</b><span><?=$order['order_content']?></span></p>
            <?php if ($order['order_type'] == 'sms'): ?>
            <p><b>价格</b><span><?=number_format($order['amount'], 2)?>元</span></p>
            <?php endif; ?>
         </td>
      </tr>
   </table>
</div>

<div class="manegeorderdiv medium"><a class="orderManage" href="javascript:;">订单管理</a></div>
<?php 
}
?>